<!DOCTYPE html>
<style type="text/css">
    body {
        margin: 0;
    }
    .box {
        width: 200px;
    }
    .box span {
        background: rgb(138, 100, 229);
        border: 3px solid orange;
        font-size: 16px;
        color: rgb(255, 255, 255);
        padding: 5px 13px;
        display: block;
        width: fit-content;
    }
</style>
<div class="box"><span>Text</span></div>
